1. Field of the Invention
The present invention relates to a visual inspecting method for electronic device, a visual inspecting apparatus for electronic device, and a record medium for recording a program which causes a computer to perform the visual inspecting method, and in particular, to those which inspects defects on a surface of a package of an electronic device.
2. Description of the Prior Art
A visual inspecting method/apparatus for automatically inspecting a defect such as a small hole (hereinafter, referred to as xe2x80x9cvoidxe2x80x9d) that takes place on the top surface of the package of an electronic device that has been fabricated is known.
In a first prior art of such a visual inspecting method disclosed as JPA 5-280958, a photographed image of the top surface of an inspection object is divided into a plurality of unit regions. With the average value of gradation levels of each unit region, the image is binarized. Whether a defect exists is detected on the basis of the shape of a region with low reflectance in the photographed image.
FIG. 1 is a block diagram showing the structure of a defect inspecting apparatus according to the first prior art.
In FIG. 1, a scanning beam is radiated from laser light source 20 to the top surface of inspection object 10. The reflected light is guided to light receiving units 28. Light receiving units 28 output image signals a1 and a2, respectively. The image signals a1 and a2 are supplied to adding unit 32, A/D converting unit 34, brightness converting unit 36, and differentiating filter 38 in the order. Differentiating filter 38 outputs signal a5 in which the contour of a defect is emphasized. Signal a5 is supplied to defect address detecting unit 40. Defect address detecting unit 40 obtains a defect address signal Ad from signal a5. Signal a5 is also supplied to binarizing unit 42. Binarizing unit 42 binarizes signal a5. The binarized signal is supplied to defect region extracting unit 48. Defect region extracting unit 48 extracts a defect region on the basis of the binarized signal and defect address Ad and outputs the extracted defect region as defect image signal A2.
In the defect determining method of the first prior art, the address of a defect is obtained on the basis of the differentiated image of the inspection object 10. Binarizing unit 42 performs the following calculation.
TH3=TH1xe2x88x92k(TH1xe2x88x92TH2)
where TH1 is a first threshold value that is obtained from the distribution of gradation levels of the entire differentiated image; TH2 is a second threshold value obtained from the average value of the gradation levels of adjacent regions of a considered pixel; and TH3 is a third threshold value. In addition, binarizing unit 42 binarizes the gradation level of each pixel by using threshold TH3.
The defect region extracting unit 48 determines that a defect on the top surface of the inspection object 10 is present at a pixel position whose gradation level is lower than threshold value TH3.
FIG. 2 is a schematic diagram showing each region of the inspecting apparatus shown in FIG. 1.
FIG. 2 shows an example of inspection object 10 shown in FIG. 1 which is a concrete electronic device 2. Referring to FIG. 2, a photographed image that is output from light receiving unit 28 contains a package 2a and a part of terminals 2b. A region that contains only the package 2a is designated as an inspection objective region Rt. The photographed images of package 2a contain an image of void B that is a defect on package 2a, images of marking characters T marked on package 2a, and an image of fluctuating portion P formed on the top surface of package 2a or formed due to reflected light.
FIG. 3 is a graph showing characteristic curves of gradation levels Lc, binarization levels Ls, versus pixel coordinate positions of the defect inspecting apparatus shown in FIG. 1. FIG. 3 shows levels taken along line Xxe2x80x94X of FIG. 2. A sharp concave portion on the left of the curve of the gradation levels Lc of the photographed image represents a void B. On the other hand, a broad concave portion on the right of the curve of the gradation levels Lc represents a fluctuating portion P. Three protrusion portions in the middle of the curve of the gradation levels Lc represent marking characters T.
At the void B, the peak width is narrow and the curve of the gradation levels Lc sharply varies. At the fluctuating portion P, the peak width is wide than that. of the void B and the curve of the gradation levels Lc gradually varies. At each of the marking characters T, although the peak width is narrow, the curve of the gradation levels Lc is higher than that of the package region.
In FIG. 3, the xe2x80x9c1xe2x80x9d level region where gradation level Lc is higher than binarization levels Ls is determined as a normal region (no-void region), whereas the xe2x80x9c0xe2x80x9d level where gradation levels Lc is lower than binarization levels Ls is determined as a void region.
As is apparent from FIG. 3, at fluctuating portion P, although the curve of gradation levels Lc slightly lowers in a wide range, the curve of binarization levels Ls obtained as the average value of curve of the gradation levels also gradually lowers.
Next, a second prior art of such a defect inspecting method will be described. The second prior art is simpler than the first prior art. In the second prior art, all the photographed image of the top surface of a package is binarized with a single predetermined binarization level. When the area of the xe2x80x9c0xe2x80x9d level region of the digitized image (namely, the area of a region whose reflectance is small) is higher than a predetermined value, the region is determined as a void region.
FIG. 4 is a graph showing characteristic curves of gradation levels Lc, binarization levels Ls versus pixel coordinate positions of a defect inspecting apparatus according to the second prior art. Similarly to FIG. 3, FIG. 4 shows curves of the photographed image of package 2a as shown in FIG. 2. to As is apparent from FIG. 4, the curve of binarization levels Ls is constant in all the range.
In the conventional defect inspecting method/apparatus, it was determined whether or not a defect such as a void is detected on the top surface of a package of an electronic device in a manner as explained above.
However, the conventional defect inspecting methods/apparatuses have the following disadvantages.
When electronic device 2 is used as an inspection object, the intensity of light radiated from light radiating source 1 to the top surface of the package 2a may vary in dependence on the direction and location of light radiating source 1. In addition, the reflectance of the top surface of package 2a may vary position by position because of fluctuation of the ingredients and surface condition of the resin of electronic device 2 and a stain adhered from a die or the like. In these cases, the gradation levels Lc of image signals al and a2 in a part of of the package 2a may differ from those of other parts as shown in FIGS. 3 and 4. Thus, fluctuating portion P tends to take place.
When the gradation level of fluctuating portion P is almost the same as that of void B, after the fluctuating portion P is binarized, it may be determined as the xe2x80x9c0xe2x80x9d level region. Thus, even if package 2a does not have a void, it is often mistakenly detected.
In the defect inspecting apparatus according to the first prior art, as shown in FIG. 3, the average value of gradation levels Lc of each unit region is used as a binarization level Ls. However, in this method, in the vicinity of a marking character T shown in FIG. 3, since gradation level Lc of the marking character T is high, the binarization level Ls becomes high. Thus, in the vicinity of a marking character T, a void may be mistakenly detected.
On the other hand, in the defect inspecting apparatus according to the second prior art, as shown in FIG. 4, the binarization process is performed for all the inspection region Rt with a constant value of the binarization levels Ls. In this method, in the vicinity of fluctuating portion P shown in FIG. 4, since the curve of gradation levels Lc lowers, a void may be mistakenly detected.
In order to overcome the aforementioned disadvantages, the present invention has been made and accordingly, has an object to provide a visual inspecting method for electronic device, a visual inspecting apparatus for electronic device, and a record medium for recording a program which causes a computer to perform the visual inspecting method which allow a real defect to be securely detected without an influence of a fluctuating portion, marking characters, and so forth contained in a photographed image of a package of an electronic device.
According to a first aspect of the present invention, there is provided a visual inspecting method for an electronic device, comprising steps of: photographing an image of a surface of the electronic device; dividing the photographed image into a plurality of unit regions and obtaining a distribution of gradation levels for each unit region; subtracting a predetermined offset value from the gradation level of the highest frequency selected from the gradation levels for each unit region so as to obtain a binarization level for each unit region; interpolating the binarization levels for unit regions so as to obtain a binarization level at each coordination position of the photographed image; and comparing the gradation level at each coordination position of the photographed image with the binarization level at each coordination position and determining that a defect is present at a coordination position where the gradation level thereat is lower than the binarization level thereat.
According to a second aspect of the present invention, there is provided a visual inspecting method for an electronic device, comprising steps of: photographing an image of a surface of the electronic device; dividing the photographed image into a plurality of unit regions and obtaining a distribution of gradation levels for each unit region; subtracting a predetermined offset value from the gradation level of the highest frequency selected from the gradation levels for each unit region so as to obtain a binarization level for each unit region; interpolating the binarization levels for unit regions so as to obtain a binarization level at each coordination position of the photographed image; comparing the gradation level at each coordination position of the photographed image with the binarization level at each coordination position and obtaining a coordinate position where the gradation level thereat is lower than the binarization level thereat; labeling a region composed of a succession of the coordinate positions where the gradation levels thereat are lower than the binarization level thereat; and determining that a defect is present in the labeled region when the area of the labeled region is larger than a predetermined area.
According to a third aspect of the present invention, there is provided a visual inspecting apparatus for an electronic device, comprising: a unit for photographing an image of a surface of the electronic device; a unit for dividing the photographed image into a plurality of unit regions and obtaining a distribution of gradation levels for each unit region; a unit for subtracting a predetermined offset value from the gradation level of the highest frequency selected from the gradation levels for each unit region so as to obtain a binarization level for each unit region; a unit for interpolating the binarization levels for unit regions so as to obtain a binarization level at each coordination position of the photographed image; and a unit for comparing the gradation level at each coordination position of the photographed image with the binarization level at each coordination position and determining that a defect is present at a coordination position where the gradation level thereat is lower than the binarization level thereat.
According to a fourth aspect of the present invention, there is provided a visual inspecting apparatus for an electronic device, comprising: a unit for photographing an image of a surface of the electronic device; a unit for dividing the photographed image into a plurality of unit regions and obtaining a distribution of gradation levels for each unit region; a unit for subtracting a predetermined offset value from the gradation level of the highest frequency selected from the gradation levels for each unit region so as to obtain a binarization level for each unit region; a unit for interpolating the binarization levels for unit regions so as to obtain a binarization level at each coordination position of the photographed image; a unit for comparing the gradation level at each coordination position of the photographed image with the binarization level at each coordination position and obtaining a coordinate position where the gradation level thereat is lower than the binarization level thereat; a unit for labeling a region composed of a succession of the coordinate positions where the gradation levels thereat are lower than the binarization level thereat; and a unit for determining that a defect is present in the labeled region when the area of the labeled region is larger than a predetermined area.
According to a fifth aspect of the present invention, there is provided a record medium for recording a program that causes a computer to perform a visual inspecting method for an electronic device, the method comprising steps of: photographing an image of a surface of the electronic device; dividing the photographed image into a plurality of unit regions and obtaining a distribution of gradation levels for each unit region; subtracting a predetermined offset value from the gradation level of the highest frequency selected from the gradation levels for each unit region so as to obtain a binarization level for each unit region; interpolating the binarization levels for unit regions so as to obtain a binarization level at each coordination position of the photographed image; and comparing the gradation level at each coordination position of the photographed image with the binarization level at each coordination position and determining that a defect is present at a coordination position where the gradation level thereat is lower than the binarization level thereat.
According to a sixth aspect of the present invention, there is provided a record medium for recording a program that causes a computer to perform a visual inspecting method for an electronic device, the method comprising steps of: photographing an image of a surface of the electronic device; dividing the photographed image into a plurality of unit regions and obtaining a distribution of gradation levels for each unit region; subtracting a predetermined offset value from the gradation level of the highest frequency selected from the gradation levels for each unit region so as to obtain a binarization level for each unit region; interpolating the binarization levels for unit regions so as to obtain a binarization level at each coordination position of the photographed image; comparing the gradation level at each coordination position of the photographed image with the binarization level at each coordination position and obtaining a coordinate position where the gradation level thereat is lower than the binarization level thereat; labeling a region composed of a succession of the coordinate positions where the gradation levels thereat are lower than the binarization level thereat; and determining that a defect is present in the labeled region when the area of the labeled region is larger than a predetermined area.
These and other objects, features and advantages of the present invention will become more apparent in light of the following detailed description of the best mode embodiments thereof, as illustrated in the accompanying drawings.